const Router = require('koa-router')
const StatisticsController = require('../controllers/statistics.controller')
const jwt = require('../middlewares/jwt.middleware')
const isRole = require('../middlewares/role.middleware')

const router = new Router()
const statisticsController = new StatisticsController()
router.prefix('/api/statistics')

router.get('/reportrate', jwt, isRole(['admin', 'auditor']), statisticsController.reportrate)

router.get('/reportstatus', jwt, isRole(['admin', 'auditor']), statisticsController.reportstatus)

module.exports = router